<?php
/**
 * View do formulário de nota_fiscal
 * @filesource  06/04/2011
 * @author      Estrada Virtual <http://estradavirtual.com.br>
 * @copyright   Copyright <2011> Estrada Virtual
 * @package     <<application>>
 * @subpackage  <<application>>.application.views
 * @version     $Id$
 */
 ?>
<div class="ev-formulario">
    <h1><?php echo $this->translate('id_nota_fiscal'); ?></h1>
    <form action="<?php echo $this->baseUrl() ?>/corporativo/nota-fiscal/gravar" method="post" name="formulario" id="formulario">
        
        <label for="id_nota_fiscal"><?php echo $this->translate('id_nota_fiscal'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <input class="text ui-widget-content ui-corner-all  required " type="text" name="id_nota_fiscal" id="id_nota_fiscal" value="<?php echo $this->row->id_nota_fiscal; ?>" title="<?php echo $this->translate("id_nota_fiscal"); ?>"   /><br />

        <label for="fk_cliente"><?php echo $this->translate('fk_cliente'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <?php echo $this->formSelect( "fk_cliente", $this->row->fk_cliente, array( "id" => "fk_cliente", "title" => $this->translate("fk_cliente"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_cliente"]); ?><br />

        <label for="dt_emissao"><?php echo $this->translate('dt_emissao'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <input class="text ui-widget-content ui-corner-all  required data " type="text" name="dt_emissao" id="dt_emissao" value="<?php echo $this->dateFormat($this->row->dt_emissao); ?>" title="<?php echo $this->translate("dt_emissao"); ?>"   /><br />

        <label for="vl_valor"><?php echo $this->translate('vl_valor'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <input class="text ui-widget-content ui-corner-all  required " type="text" name="vl_valor" id="vl_valor" value="<?php echo $this->row->vl_valor; ?>" title="<?php echo $this->translate("vl_valor"); ?>"   /><br />

        <label for="cs_situacao"><?php echo $this->translate('cs_situacao'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <input class="text ui-widget-content ui-corner-all  required " type="text" name="cs_situacao" id="cs_situacao" value="<?php echo $this->row->cs_situacao; ?>" title="<?php echo $this->translate("cs_situacao"); ?>"   /><br />

        <div id="botoesAcao">
            <input type="submit" class="btSalvar" name="enviar" id="enviar" value="Enviar" />
            <input type="button" class="btExcluir" name="cancelar" id="cancelar" value="Cancelar" />
        </div>
    </form>
</div>

<script type="text/javascript">
    $().ready(function() {
        $("form").validate();
        $('#cancelar').click(function(){
            window.location = "<?php echo $this->baseUrl() ?>/corporativo/nota-fiscal";
        });
    });
</script>